<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
     <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>{% block title %}{{ config.SITE_NAME }}{% endblock %}</title>
    <meta name="keywords" content="{% block keyword %}{{ g.site_keyword }}{% endblock %}"/>
    <meta name="description" content="{% block description %}{{ g.site_description }}{% endblock %}"/>
    <link rel="icon" href="{{ url_for('static', filename='favicon.ico') }}">
    <link rel="stylesheet" href="{{ url_for('home.static', filename='default/bulma/css/bulma.min.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='base.css') }}">
</head>
<body>
{% include 'default/common/nav.html' %}
{% block hero %}
{% set top = select_article('top')[:1]%}
{% for t in top %}
<section class="hero is-primary hero-pic hero-pic-index"{%- if t.thumbnail %} style="background-image: url('{{ top[0].thumbnail }}');"{%- endif -%}>
    <div class="hero-body">
        <div class="container">
            <p class="title is-2"><a href="{{ t.url }}" title="{{ t.title }}">{{ t.title }}</a></p>
            <time datetime="2016-1-1">{{ t.create_date }}</time>
        </div>
    </div>
</section>
{% endfor %}
{% endblock %}

{% block main %}
<div class="container">
    <div class="columns">
        {% for item in select_article('focus')[:4] %}
        <div class="column is-3">
            <a class="good" href="{{ item.url }}" title="{{ item.title }}">
                <div class="card">
                    <div class="card-image">
                        <figure class="image is-3by2">
                            <img src="{{ item.thumbnail|default('https://www.kanhebei.cn/static/logo.png', True) }}"
                                 alt="{{ item.title }}">
                        </figure>
                    </div>
                    <div class="card-content">
                        <p class="title is-6">{{ item.title }}</p>
                        <time datetime="2016-1-1">{{ item.create_datetime }}</time>
                    </div>
                </div>
            </a>
        </div>
        {% endfor %}
    </div>

    <div class="columns">
        <div class="column is-two-thirds">
            <div class="card">
                <header class="card-header">
                    <p class="card-header-title title is-5">
                        推荐
                    </p>
                </header>
                <div class="card-content">
                    {% for item in select_article('good')[:12] %}
                    <article class="media">
                        <div class="media-content">
                            <div class="content">
                                <p class="title is-6 is-spaced">
                                    <a href="{{ item.url }}">{{ item.title }}</a>
                                </p>
                                <p>{{ item.description }}</p>
                                <time datetime="2016-1-1">{{ item.create_datetime }}</time>
                            </div>
                        </div>
                    </article>
                    {% endfor %}
                </div>
            </div>

        </div>
        <div class="column">
            <div class="card">
                <header class="card-header">
                    <p class="card-header-title title is-5">
                        最新
                    </p>
                </header>
                <div class="card-content">
                    {% for item in select_article('latest')[:30] %}
                    <p class="subtitle is-size-5">
                        <a href="{{ item.url}}">{{ item.title }}</a>
                    </p>
                    {% endfor %}
                </div>
            </div>

        </div>
    </div>
</div>
{% endblock %}


<footer class="footer" style="padding:1.5rem 1rem 2rem 1rem; margin-top:1.5rem">
    {% block links %}{% endblock %}
    <div class="container content has-text-centered">
        <p>空谈误国，实干兴邦</p>
        <p>技术支持: 河北鼎道网络技术有限公司</p>
        <p> {%- if g.site_icp -%}
            <a class="button is-light is-small" rel="nofollow" href="http://www.beian.miit.gov.cn/">{{ g.site_icp }}</a>
            {%- endif -%}
            {%- if g.site_gwab -%}
            <a class="button is-light is-small" style="margin-left: 10px;" rel="nofollow" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode={{ g.site_gwab }}">{{ g.site_gwab }}</a>
            {%- endif -%}
        </p>
        <p class="title is-6">{{ config.SITE_NAME }}</p>
    </div>
</footer>
</body>
</html>
